Enclosed are 4 test cases for the September 1996 Programmer's Challenge
Three of the test cases are Applets created with Symantec Cafe. The fourth is an application created with Cafe.
The JavaMiniVM.µ project parses each of the class files, calls one of the methods, and compares the result to an expected value.
Each test case includes a .dmp file created by Symantec's DumpClass routine containing a disassembly of the class file.
Note that these are representative test cases only. The Challenge test code may stress your code in ways these cases do not. Feel free to write your own applets following these examples.
REVISION 1, 20 Aug 96
- removed a call to a java/awt/Component method inadvertently left in the swarm example
- corrected the Fib example so it does not require input parameters
- added a few opcodes to the MiscByteCodes example (invokenonvirtual, tableswitch)
- corrected the parsing logic for the constant pool so it correctly deals with 8 byte constants
NOTE: Your miniVM is expected to set up the execution frame for the class called by the test code. In a full VM implementation, this would involve allocating space for local variables and the operand stack, as well as running the default constructor for your class. In the Challenge, class variables will be initialized explicitly in code; you don't need to worry about a constructor. You _do_ need to create an object reference to your class before beginning execution. (See the first instruction, aload_0, in the swarm.myRun method.)